/**
 * erp生产订单与对应表 api 封装
 *
 * @Author:    akita
 * @Date:      2025-04-17 14:03:35
 * @Copyright  无
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const accountApi = {
  queryPage: (param) => {
    return postRequest('/account/queryPage', param);
  },

  add: (param) => {
    return postRequest('/account/add', param);
  },

  update: (param) => {
    return postRequest('/account/update', param);
  },

  delete: (id) => {
    return getRequest(`/account/delete/${id}`);
  },

  batchDelete: (idList) => {
    return postRequest('/account/batchDelete', idList);
  },

  info: (param) => {
    return getRequest('/account/info/' + param);
  },

  batchExcute: (idList) => {
    return postRequest('/account/batchExcute', idList);
  },
  clear: (id) => {
    return getRequest(`/account/clear/${id}`);
  },
};

/**
 * 生产订单与机器对应表 api 封装
 *
 * @Author:    AKITA
 * @Date:      2025-04-19 13:14:12
 * @Copyright  AKITA
 */

export const accountaApi = {
  /**
   * 分页查询  @author  AKITA
   */
  queryPage: (param) => {
    return postRequest('/accounta/queryPage', param);
  },

  /**
   * 增加  @author  AKITA
   */
  add: (param) => {
    return postRequest('/accounta/add', param);
  },

  /**
   * 修改  @author  AKITA
   */
  update: (param) => {
    return postRequest('/accounta/update', param);
  },

  /**
   * 删除  @author  AKITA
   */
  delete: (id) => {
    return getRequest(`/accounta/delete/${id}`);
  },

  /**
   * 批量删除  @author  AKITA
   */
  batchDelete: (idList) => {
    return postRequest('/accounta/batchDelete', idList);
  },
};

export const accountbApi = {
  /**
   * 分页查询  @author  akita
   */
  queryPage: (param) => {
    return postRequest('/accountb/queryPage', param);
  },

  /**
   * 增加  @author  akita
   */
  add: (param) => {
    return postRequest('/accountb/add', param);
  },

  /**
   * 修改  @author  akita
   */
  update: (param) => {
    return postRequest('/accountb/update', param);
  },

  /**
   * 删除  @author  akita
   */
  delete: (id) => {
    return getRequest(`/accountb/delete/${id}`);
  },

  /**
   * 批量删除  @author  akita
   */
  batchDelete: (idList) => {
    return postRequest('/accountb/batchDelete', idList);
  },
};

export const accountcApi = {
  /**
   * 分页查询  @author  akita
   */
  queryPage: (param) => {
    return postRequest('/accountc/queryPage', param);
  },

  /**
   * 增加  @author  akita
   */
  add: (param) => {
    return postRequest('/accountc/add', param);
  },

  /**
   * 修改  @author  akita
   */
  update: (param) => {
    return postRequest('/accountc/update', param);
  },

  /**
   * 删除  @author  akita
   */
  delete: (id) => {
    return getRequest(`/accountc/delete/${id}`);
  },

  /**
   * 批量删除  @author  akita
   */
  batchDelete: (idList) => {
    return postRequest('/accountc/batchDelete', idList);
  },
};
